<?php
/*------------------------------------------------------------------------

# TZ Portfolio Extension

# ------------------------------------------------------------------------

# author    TranLamTemPlaza

# copyright Copyright (C) 2012 templaza.com. All Rights Reserved.

# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL

# Websites: http://www.templaza.com

# Technical Support:  Forum - http://templaza.com/Forum

-------------------------------------------------------------------------*/

defined('_JEXEC') or die;

$doc = JFactory::getDocument();
$doc->addStyleSheet('modules/mod_tz_teaser_slide/css/style.css');
$doc->addStyleSheet('modules/mod_tz_teaser_slide/showbizpro/css/settings.css');
$doc->addStyleSheet('modules/mod_tz_teaser_slide/showbizpro/fancybox/jquery.fancybox.css?v=2.1.3');
$doc->addScript('modules/mod_tz_teaser_slide/showbizpro/js/jquery.themepunch.showbizpro.min.js');
$doc->addScript('modules/mod_tz_teaser_slide/showbizpro/fancybox/jquery.fancybox.pack.js?v=2.1.3');

?>

<!-- THE CONTENT // DEMOS -->
<div class="demos">

<!-- DEMO I. -->
<div id="example1" class="showbiz-container">

<!-- THE NAVIGATION -->
<div class="showbiz-navigation center sb-nav-grey">
    <a id="showbiz_left_1" class="sb-navigation-left"><i class="sb-icon-left-open"></i></a>
    <a id="showbiz_play_1" class="sb-navigation-play"><i class="sb-icon-play sb-playbutton"></i><i class="sb-icon-pause sb-pausebutton"></i></a>
    <a id="showbiz_right_1" class="sb-navigation-right"><i class="sb-icon-right-open"></i></a>
    <div class="sbclear"></div>

</div> <!-- END OF THE NAVIGATION -->

<div class="divide20"></div>

<!--	THE PORTFOLIO ENTRIES	-->
<div class="showbiz" data-left="#showbiz_left_1" data-right="#showbiz_right_1" data-play="#showbiz_play_1">

<!-- THE OVERFLOW HOLDER CONTAINER, DONT REMOVE IT !! -->
<div class="overflowholder">
    <!-- LIST OF THE ENTRIES -->
    <ul>
        <?php
        for($i=0;$i<count($rows);$i++){
        ?>
            <!-- AN ENTRY HERE , WITH PREDEFINED GREY SKIN-->
            <li class="sb-woo-skin">

                <?php
                if($show_image == 1){
                ?>
                    <!-- THE MEDIAHOLDER CONTAINER -->
                    <div class="mediaholder">
                        <!-- THE INNER WRAP FOR MEDIA HOLDER -->
                        <div class="mediaholder_innerwrap">
                            <img alt="" src="<?php echo JUri::base().substr($rows[$i] ->images,0,69)."_L.".substr($rows[$i] ->images,70,80);?>">

                            <!-- THE HOVER CONTAINER AND THE HOVER ICONS -->
                            <div class="hovercover" >
                                <a href="<?php echo $rows[$i] ->link;?>"><div class="linkicon notalone"><i class="sb-icon-link"></i></div></a>
                                <a class="fancybox" rel="group" href="<?php echo JUri::base().substr($rows[$i] ->images,0,69)."_L.".substr($rows[$i] ->images,70,80);?>"><div class="lupeicon notalone"><i class="sb-icon-search"></i></div></a>
                            </div><!-- END OF HOVER CONTIANER -->

                        </div><!-- END OF MEDIAHOLDER INNER WRAP-->
                    </div><!-- END OF MEDIAHOLDER CONTAINER -->
                <?php
                }
                ?>

                <!-- THE VISIBLE DETAILS -->
                <div class="detailholder">
                    <div class="divide15"></div>
                    <?php
                    if($show_title==1){
                    ?>
                        <h4 class="showbiz-title txt-center"><a href="<?php echo $rows[$i] ->link;?>"><?php echo $rows[$i] ->title;?></a></h4>
                    <?php
                    }
                    ?>
                    <div class="divide5"></div>
                    <?php
                    if($show_introtext ==1){
                    ?>
                        <p class="txt-center"><?php echo substr($rows[$i] ->introtext,0,200);?></p>
                    <?php
                    }
                    ?>
                    <div class="divide10"></div>
                    <div class="txt-center"><span class="rating-star" data-rates="5"></span></div>
                    <div class="txt-center"><span class="rating-text">RATED 5 OUT OF 5</span></div>
                    <hr>
                    <div class="txt-center"><span class="sb-price">$27,49</span><a class="showbiz-button">Add To Cart</a></div>
                </div><!-- END OF VISIBLE DETAILS -->
            </li><!-- END OF ENTRY -->
        <?php
        }
        ?>

    </ul>

<div class="sbclear"></div>
</div> <!-- END OF OVERFLOWHOLDER -->
<div class="sbclear"></div>
</div>
</div><!-- END OF DEMO WOO. -->


</div> <!-- END OF DEMOS -->

<script type="text/javascript">

    jQuery(document).ready(function() {

        jQuery('#example1').showbizpro({
            dragAndScroll:"<?php if($drag_and_scroll==1){echo "on";} else echo "off";?>",
            visibleElementsArray:[4,3,2,1],
            carousel:"<?php if($carousel==1){echo "on";} else echo "off";?>",
            entrySizeOffset:0,
            allEntryAtOnce:"<?php if($all_entry_at_once==1){echo "on";} else echo "off";?>",
            rewindFromEnd:"<?php if($rewind_from_end==1){echo "on";} else echo "off";?>",
            autoPlay:"<?php if($auto_play==1){echo "on";} else echo "off";?>",
            delay:<?php echo $delay;?>,
            speed:<?php echo $speed;?>
        });

        // THE FANCYBOX PLUGIN INITALISATION
        jQuery(".fancybox").fancybox();

    });

</script>
